"""
File:urls.py
Author:Tcyw
Date:2020-03-18
Connect:741047561@qq.com
Description:

"""
from django.conf.urls import url
from . import views
urlpatterns = [
    url(r'^$',views.index,name='index'),
    # ^: 以什么开头， $是以什么结尾。 [0-9]指单个数字, +代表前面的字符出现1次或者多次。
    # [0-9]+: 1, 2, 2344, 78888,
    # (?P<id>[0-9]+) 关键字匹配
    # /post/1/   ====> 1满足正则规则的， 将id=1
    # 正则表达式的内容
    url(r'^post/(?P<id>[0-9]+)/$', views.detail, name='detail'),
    url(r'^category/(?P<id>[0-9]+)/$', views.category, name='category'),
    url(r'^tag/(?P<id>[0-9]+)/$', views.tag, name='tag'),
    url(r'^archives/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$',views.archives, name='archives'),

]







